package mylib.dir;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: 1
 * Date: 18.07.12
 * Time: 17:50
 * To change this template use File | Settings | File Templates.
 */
public class ArrayUtils {
    public static void addToArray(int[] array, int by) {
        for (int i = 0; i < array.length; ++i)
            array[i] += by;
    }

    public static int[] toArray(ArrayList<Integer> list) {
        int[] res = new int[list.size()];
        int p = 0;
        for (int x : list)
            res[p++] = x;
        return res;
    }
}
